﻿@using JULONG.WEB.Library
@model IEnumerable<DFYE.Web.Models.document>

@{
    ViewBag.Title = "Index";

    paging paging = new paging();
    paging.pageSize = 2;
    dynamic pagingMode;
    var vModel = paging.content(
        Model,
        out pagingMode, Html.getRoute("page").As<int>()
        );
    ViewBag.paging = pagingMode;
    
}

<h2 class="pageTitle">新闻</h2>
<ul class="pageMain">

@foreach (var item in vModel) {
    <li>@Html.ActionLink(item.title, "Show", new { id = item.ID }, new { target = "_blank" })<label class="date">[@item.datetime.ToString("yyyy-M-d")]</label></li>
}
@Html.Partial("paging", new { action = "Index" })
</ul>


